<?php

class Application_Form_Email extends Asd_Form
{

    public function init()
    {
        $this->setName('email_form');
        parent::init();
        
        $this->setMethod("POST");
        
        $user_email = new Zend_Form_Element_Text('user_email');
        $user_email->setLabel('Email')
                ->setRequired(true)
                ->addFilter('StringToLower')
                ->addValidator('NotEmpty')
                ->addValidator('Db_NoRecordExists', false, array(
                    'table' => 'users',
                    'field' => 'user_email'
                ))
                ->addValidator('EmailAddress');
        $this->addElement($user_email);
        
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Сыр сөздү киргизиңиз:')
                 ->setRequired(true)
                 ->addPrefixPath('Asd_Validator', 'Asd/Validator', 'validate')
                 ->addValidator('Passwordmatch')
                 ->addValidator('NotEmpty');
        $this->addElement($password);
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Өзгөртүү')
                ->setAttrib('class', 'button_big');
        $this->addElement($submit);
    }


}

